package me.sdevil507.org.mapper;

import me.sdevil507.org.dto.OrgKeywordParamsDto;
import me.sdevil507.org.dto.OrgKeywordResultDto;
import me.sdevil507.org.po.OrgKeywordPo;
import org.mapstruct.Mapper;
import org.mapstruct.NullValuePropertyMappingStrategy;
import org.springframework.stereotype.Component;

import java.util.List;

/**
 * 机构关键词Mapper
 *
 * @author sdevil507
 * created on 2020/7/14
 */
@Component
@Mapper(componentModel = "spring", nullValuePropertyMappingStrategy = NullValuePropertyMappingStrategy.IGNORE)
public interface OrgKeywordMapper {

    /**
     * po => dto
     *
     * @param po 实体类
     * @return dto传输类
     */
    OrgKeywordResultDto po2dto(OrgKeywordPo po);

    /**
     * pos => dtos
     *
     * @param pos pos
     * @return dtos
     */
    List<OrgKeywordResultDto> pos2dtos(List<OrgKeywordPo> pos);

    /**
     * dto => po
     *
     * @param dto 传输类
     * @return po实体类
     */
    OrgKeywordPo dto2po(OrgKeywordParamsDto dto);
}
